#include "start.h"
#include "ui_start.h"
#include<base.h>
#include<QPainter>
#include"map.h"
#include<QObject>
#include<QPixmap>
#include"mainwindow.h"
start::start(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::start)
{
    ui->setupUi(this);
   initScene();
}

start::~start()
{
    delete ui;
}
void start::paintEvent(QPaintEvent *)
{
     s.m_map2.load(MAPPATH1);
    QPainter painter(this);
    painter.drawPixmap(0,s.m_map2_posY , s.m_map2);
}
void start::initScene()
{
    //设置窗口标题
    setWindowTitle(GAME_TITLE);
     setWindowIcon(QIcon( GAME_ICON));
}

void start::on_pushButton_clicked()
{
   this->hide();
    emit startsignal();
}

void start::on_pushButton_2_clicked()
{
    emit settingsignal();
}
